$(document).ready(function(){
	$(".Notice_Customer_Link").click(function(){
		var id = $(this).attr("id");
		$('#frmNotice_PropertyValue').attr("name","betInfo.betId");
		$('#frmNotice_PropertyValue').val(id);
		
		$('#frmNotice').attr('action',ACCOUNT_VIEW_PROFILE_URL);
    	$('#frmNotice').submit();
		
	});
	
	$(".Notice_Bet_Link").click(function(){
		var id = $(this).attr("id");
		$('#frmNotice_PropertyValue').attr("name","customerInfo.customerId");
		$('#frmNotice_PropertyValue').val(id);
		
		$('#frmNotice').attr('action',BET_VIEW_DETAIL_URL);
    	$('#frmNotice').submit();
	});
	
});

function postSocialMessage(socialType, propertyKey, propertyValue) {
	$.ajax({
		url : SOCIAL_SHARE_AJAX_URL,
		dataType : 'json',
		type: 'post',
		iframe : true,
		data : {
			'snsPostingInfo.socialType' : socialType, 
			'snsPostingInfo.propertyKey' : propertyKey,
			'snsPostingInfo.propertyValue' : propertyValue
		},
		success : function(data) {
			if(data.errorFlag == 1) {
				alert(data.errorMessage);
			} else if(data.errorFlag == 2) {
				window.open(SOCIAL_SETTING_URL);
			}
		},
		error : function(xhr, ajaxOptions, thrownError) {
			//alert(xhr.status);
			//alert(thrownError);
		}
	});
}